eth/tracers/logger: add create addresses to struct logs - #35561
Open
xternet wants to merge 1 commit into
Open
Conversation
Expose the projected destination for CREATE and CREATE2 before opcode execution. The address remains useful when contract creation later fails. Fixes ethereum#28375
xternet
requested review from
MariusVanDerWijden,
lightclient and
rjl493456442
as code owners
August 20, 2026 21:19
Member
|
Will discuss with team. I think this feature request is valid due to the following reasons:
Therefore, it's probably easier just exposing the address directly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the projected
createAddrtoCREATEandCREATE2struct-log entries. Because the tracer hook runs before opcode execution, the address is still emitted if contract creation later fails, matching the behavior discussed in #28375.CREATEuses the caller address and current nonce.CREATE2uses the caller, salt, and selected init-code bytes. The field is exposed by both struct and streaming JSON loggers, legacy JSON, and human-readable output.Tests:
go test ./eth/tracers/logger -count=1go test ./cmd/evm -run "^TestEvmRun$" -count=1GOMAXPROCS=20 GOFLAGS=-p=20 make allgo run ./build/ci.go testgo run ./build/ci.go lintgo run ./build/ci.go check_generatego run ./build/ci.go check_baddepsFixes #28375